package net.realsee.service.wcs.work;

import com.baomidou.mybatisplus.extension.service.IService;
import net.realsee.domain.wcs.work.WcsOrderDetail;
import net.realsee.domain.wcs.work.bo.WcsOrderDetailBo;
import net.realsee.domain.wcs.work.vo.WcsOrderDetailVo;
import net.realsee.framework.core.domain.PageQuery;
import net.realsee.framework.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 单据行Service接口
 *
 * @author realsee
 * @date 2023-08-11
 */
public interface IWcsOrderDetailService extends IService<WcsOrderDetail> {

    /**
     * 查询单据行
     */
    WcsOrderDetailVo selectVoById(Long id);

    /**
     * 查询单据行列表
     */
    TableDataInfo<WcsOrderDetailVo> selectVoPage(WcsOrderDetailBo bo, PageQuery pageQuery);

    /**
     * 查询单据行列表
     */
    List<WcsOrderDetailVo> selectVoList(WcsOrderDetailBo bo);

    /**
     * 新增单据行
     */
    Boolean insertByBo(WcsOrderDetailBo bo);

    /**
     * 修改单据行
     */
    Boolean updateByBo(WcsOrderDetailBo bo);

    /**
     * 校验并批量删除单据行信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids);

    /**
     * 通过订单号和订单类型和目的库位查询
     */
    WcsOrderDetail getByOrderNoAndOrderTypeAndToLocation(String orderNo, Long orderType, String toLocation);

    String getEndLocationByOrderNoAndOrderType(String orderNo, Long orderType);
}
